<?php
namespace App\Http\Controllers\System;

use App\Http\Controllers\Controller;
use App\Common\Utils\JsonResponse;
use Illuminate\Http\Request; 

class TaskController extends Controller{

    private $Request;
    private $taskService;
    private $logService;
  
    public function __construct(Request $Request)
    {
        parent::__construct();
      
        /** @var \App\Services\System\TaskService $taskService */
        $this->taskService = app('taskService');
        $this->Request = $Request;
         /** @var \App\Services\System\LogService $logService */
         $this->logService = app('logService');
    }

    /**
     * 获取列表
     * @author lxy
     * @datetime 2023-03-28
     */
    public function getTaskList()
    {
        try{
            $result = $this->taskService->getTaskList($this->Request->all());
            return JsonResponse::success($result,'操作成功');
        }catch(\Exception $e){
            return JsonResponse::error($e->getMessage());
        }
    }

}